<template>
  <div id="app">
    <transition name="transitionMove">
      <router-view v-if="routerAlive" />
    </transition>
  </div>
</template>
<script>
import TheHead from '@/components/TheHead.vue'
export default {
  components: {
    TheHead
  },
  data() {
    return {
      routerAlive: true
    }
  },
  provide() {
    return {
      routerRefresh: this.routerRefresh
    }
  },
  methods: {
    routerRefresh() {
      this.routerAlive = false
      this.$nextTick(() => {
        this.routerAlive = true
      })
    }
  }
}
</script>
<style lang="scss">
#app {
  overflow: hidden;
}
.transitionMove-enter-active,
.transitionMove-leave-active {
  transition: all 0.5s cubic-bezier(1, 0.5, 0.8, 1);
}
.transitionMove-enter, .transitionMove-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}
</style>
